import Vue from 'vue'
import Router from 'vue-router'
import Index from '../components/pages/Index'
Vue.use(Router)
import Hto from '../components/pages/Hot'
import Recommend from '../components/pages/Recommend'
import Seach from '../components/pages/Seach'
import SongSheet from '../components/pages/Songsheet'
import Music from '../components/pages/Music'
export default new Router({
  routes: [
    {
      path: '/index',
      component: Index,
      children:[
        {
          path:'hot',
          component:Hto
        },
        {
          path:'recommend',
          component:Recommend
        },
        {
          path:'seach',
          component:Seach
        },
        {
          path:'',
          redirect:'/index/recommend'
        }
      ]
    },
    {
      path: '*',
      redirect: '/index'
    },
    {
      path:'/songsheet/:id',
      component:SongSheet
    },
    {
      path:'/music/:id',
      component:Music
    }

  ]
})
